<%-- 
    Document   : index
    Created on : Apr 2, 2012, 3:20:45 AM
    Author     : Apol
--%>

<%-- Header Area --%>
<%@ include file="/template/header.jsp" %> 
<%-- End of Header Area --%>

<%-- Content Area --%>
<h2>Order History</h2>

<div class="submenu">
    <ul>
        <li><a href="/account/profile">Personal Information</a></li>
        <li><a href="/account/info">My Addresses</a></li>
        <li><a href="/account/history">Order History</a></li>
    </ul>
    <div class="clear"></div>
</div>
<table class="generic-vertical-table">
    <tr>
        <th>Transaction ID</th>
        <th>Date</th>
        <th>Total Price</th>
        <th>Status</th>
    </tr>
    <% if (transactions != null && transactions.size() > 0) { %>
    <% for (Transaction t : transactions) {%>
    <input type="hidden" name="id" value="<%= t.getTrans_id() %>" />    
    <tr>
        <td><a href="/account/history/detail?id=<%= t.getTrans_id() %>">#<%= t.getTrans_id() %></a></td>
            <td><%= t.getDate_purchased() %></td>
            <td><%= t.getTotal_amount() %></td>
            <td><%= t.getStatus() %></td>
    </tr>
    <% } %>
    <% } else { %>
    <tr>
        <td colspan="4" align="center">
            No orders found.
        </td>
    </tr>
    <% } %>

</table>

<%@ include file="/template/footer.jsp" %> 
